package com.bzkj.web.controller.system;

import com.bzkj.basicinfo.domain.sys.SysBackupsPathEntity;
import com.bzkj.basicinfo.service.SysBackupsPathService;
import com.bzkj.common.annotation.LogC;
import com.bzkj.common.core.domain.R;
import com.bzkj.common.enums.BusinessType;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @Date 2025/01/17 15:44:44
 * @description 系统数据备份信息
 */
@RestController
@RequestMapping("sys/backups/path")
public class SysBackupsPathController
{
    @Autowired
    private SysBackupsPathService sysBackupsPathService;

    /**
     * 获取当前备份信息
     * @return
     */
    @GetMapping("findData")
    public R findData(){
        return sysBackupsPathService.findData();
    }

    /**
     * 修改备份信息
     * @param entity
     * @return
     */
    @PutMapping("putData")
    @LogC(title = "备份信息", businessType = BusinessType.UPDATE,
            tableNames = "sys_backups_path",pkFieldNames = "id",
            content = "'路径：'+#entity.filePath")
    public R putData(@RequestBody SysBackupsPathEntity entity){
        return sysBackupsPathService.putData(entity);
    }

}
